<script setup>
import { provide, ref } from "vue";
import data from "./data.json";
import Editor from "./packages/editor";
import { registerConfig as config } from "./utils/editor-config";
const state = ref(data);
const formData = ref({ username: "zfjg", password: 123 });
provide("config", config); // 将组件的配置直接传入
</script>

<template>
  <div id="app">
    <Editor v-model="state" :formData="formData"></Editor>
  </div>
</template>

<style lang="scss">
#app {
  position: fixed;
  top: 20px;
  bottom: 20px;
  left: 20px;
  right: 20px;
}
</style>
